# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=hexyl
pkgver=0.14.0
pkgrel=0
pkgdesc="Command-line hex viewer with colored output"
url="https://github.com/sharkdp/hexyl"
license="MIT OR Apache-2.0"
arch="all"
makedepends="cargo cargo-auditable"
source="https://github.com/sharkdp/hexyl/archive/v$pkgver/hexyl-$pkgver.tar.gz"
options="net" # fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
770fe3db1fc10ba78cde00d727cf0494d0447e08e1e1f103bd206475c839d4d04c714b5257a3c42d2e489ce02e0b4b9b2701fb89ca9222830c87ccaa2fc8463c  hexyl-0.14.0.tar.gz
"
